Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  List  Active  Directory  Connections  

 Content of List Active Directory Connections.vbs
MD5 Hash: AA2A7624583B837AB696EB9A823A8175
' Description: Lists Active Directory connections (nTDSConnection objects) for a specified domain controller.


strDcRDN = "cn=atl-dc-01"
strSiteRDN = "cn=Ga-Atl-Sales"

Set objRootDSE = GetObject("LDAP://RootDSE")
strConfigurationNC = objRootDSE.Get("configurationNamingContext")

strNtdsSettingsPath = "LDAP://cn=NTDS Settings," & strDcRDN & _
",cn=Servers," & strSiteRDN & ",cn=Sites," & strConfigurationNC

Set objNtdsSettings = GetObject(strNtdsSettingsPath)

objNtdsSettings.Filter = Array("nTDSConnection")

WScript.Echo strDcRDN & " NTDS Connection Objects" & vbCrLf & _
String(Len(strDcRDN) + 24, "=")

For Each objConnection In objNtdsSettings
WScript.Echo "Name: " & objConnection.Name
WScript.Echo "Enabled: " & objConnection.enabledConnection
WScript.Echo "From: " & Split(objConnection.fromServer, ",")(1)
WScript.Echo "Options: " & objConnection.Options
WScript.Echo "Transport: " & Split(objConnection.transportType, ",")(0)
WScript.Echo "Naming Contexts"
WScript.Echo "---------------"
For Each objDNWithBin In objConnection.GetEx("ms-DS-ReplicatesNCReason")
Wscript.Echo objDNWithBin.DNString
Next
WScript.Echo
Next

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a